﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Members.aspx.cs" Inherits="Manager_Members" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager" runat="server" AutoSizePanelID="gridList" />
    <ext:Grid ID="gridList" runat="server" AllowPaging="true" PageSize="25" ForceFitAllTime="true"
        EmptyText="暂时没有相关数据!" RowNumberWidth="40px" DataKeyNames="UserID" ShowBorder="false"
        EnableRowNumber="true" IsDatabasePaging="true" AutoScroll="true" ShowHeader="false"
        EnableCheckBoxSelect="true" EnableRowNumberPaging="true" OnPageIndexChange="gridList_PageIndexChange"
        AllowSorting="true" SortColumnIndex="2" SortDirection="DESC" OnSort="gridList_Sort">
        <Columns>
            <ext:BoundField ID="BoundField1" runat="server" HeaderText="用户名" DataField="UserName" />
            <ext:TemplateField ID="TemplateField1" runat="server" HeaderText="姓名" Width="80">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("FirstName")+" "+Eval("LastName") %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:TemplateField ID="TemplateField2" runat="server" HeaderText="性别" Width="60">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# GetSex(Eval("Sex")) %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:BoundField ID="BoundField6" runat="server" HeaderText="联系电话" DataField="Tel" />
            <ext:BoundField ID="BoundField2" runat="server" HeaderText="注册时间" DataField="AddTime"
                SortField="AddTime" />
            <ext:BoundField ID="BoundField3" runat="server" HeaderText="注册IP" DataField="FirstIP" />
            <ext:BoundField ID="BoundField4" runat="server" HeaderText="最近登录时间" DataField="LastLoginTime"
                SortField="LastLoginTime" />
            <ext:BoundField ID="BoundField5" runat="server" HeaderText="最近登录IP" DataField="LastIP" />
            <ext:BoundField ID="BoundField7" runat="server" HeaderText="登录次数" Width="70" DataField="LoginTimes" />
            <ext:WindowField ID="winReadUser" runat="server" WindowID="winForm" Icon="magnifier"
                Title="查看会员详细资料" ToolTip="查看会员详细资料" DataIFrameUrlFields="UserId" Width="30" TextAlign="center"
                DataIFrameUrlFormatString="MemberIndex.aspx?Mid={0}" />
        </Columns>
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server" Position="top">
                <Items>
                    <ext:Label runat="server" Text="会员列表">
                    </ext:Label>
                    <ext:ToolbarFill runat="server">
                    </ext:ToolbarFill>
                    <ext:Button ID="btnSearch" runat="server" Icon="systemsearch" Text="查询" OnClick="btnSearch_Click">
                    </ext:Button>
                    <ext:Button ID="btnSendMail" runat="server" Icon="mail" Text="发送邮件" Visible="false">
                    </ext:Button>
                    <ext:Button ID="btnDelete" runat="server" Icon="delete" Text="删除选择" OnClick="btnDelete_Click"
                        ConfirmText="是否确定删除选中？">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <PageItems>
            <ext:Button ID="btnRefresh" runat="server" Icon="arrowrefresh" OnClick="btnRefresh_Click">
            </ext:Button>
            <ext:ToolbarFill ID="ToolbarFill3" runat="server">
            </ext:ToolbarFill>
            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
            </ext:ToolbarSeparator>
            <ext:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
            </ext:ToolbarText>
            <ext:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
                OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                <ext:ListItem Text="15" Value="15" />
                <ext:ListItem Text="20" Value="20" />
                <ext:ListItem Text="25" Value="25" Selected="true" />
            </ext:DropDownList>
        </PageItems>
    </ext:Grid>
    <ext:Window ID="winForm" runat="server" Hidden="true" Width="600px" EnableMaximize="true"
        EnableResize="true" EnableConfirmOnClose="true" Height="450px" CloseAction="hideRefresh"
        EnableIFrame="true" AutoScroll="true">
    </ext:Window>
    <ext:Window ID="winSearch" runat="server" Icon="Systemsearch" Hidden="true" Width="400"
        Height="250" Title="查询会员信息" BoxConfigPadding="5" FooterBarAlign="center">
        <Items>
            <ext:SimpleForm ID="sfObject" runat="server" BoxConfigPadding="5" LabelAlign="right"
                LabelWidth="90" ShowHeader="false">
                <Items>
                    <ext:TextBox ID="txtUserName" runat="server" Label="姓名" EmptyText="请填写姓名关键词">
                    </ext:TextBox>
                    <ext:DatePicker ID="dpRegDate1" runat="server" Label="注册时间" EmptyText="请注册起始时间">
                    </ext:DatePicker>
                    <ext:DatePicker ID="dpRegDate2" runat="server" Label="至" EmptyText="请注册结束时间">
                    </ext:DatePicker>
                    <ext:DatePicker ID="dpLoginDate1" runat="server" Label="最近登录时间" EmptyText="请最近登录起始时间">
                    </ext:DatePicker>
                    <ext:DatePicker ID="dpLoginDate2" runat="server" Label="至" EmptyText="请最近登录结束时间">
                    </ext:DatePicker>
                </Items>
            </ext:SimpleForm>
        </Items>
        <Toolbars>
            <ext:Toolbar runat="server" Position="footer">
                <Items>
                    <ext:Button ID="btnSearch1" runat="server" Text="查 询" Icon="systemsearch" ValidateForms="sfObject"
                        OnClick="btnSearch1_Click">
                    </ext:Button>
                    <ext:Button ID="btnReset" runat="server" Text="重 置" Icon="arrowredo">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
    </ext:Window>
    </form>
</body>
</html>
